All Databases
Inside Mac - Basic Toolbox
Converting TextEdit records
GetIText
TESetText
TERec
Converting TextEdit records
Frequently, you want to use a
TextEdit record
in a function that expects a
string of type
Str255
. These routines let you convert between them:
void TERectToStr(
TEHandle
hTE,
Str255
str)
{
GetIText
( (*hTE)->hText, str );
}
void StrToTERec(
Str255
str,
TEHandle
hTE)
{
TESetText
( (
Ptr
) &str[1], (long) str[0], hTE );
}
Referenced by (2):
TEGetText
TESetText